<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>cookie bom操作</title>
  <script>
    function setBgColor(color){
      color=window.prompt("请输入背景颜色")
      setCookie('bgcolor',color,3)
    }
    function setFontColor(color){
      color=window.prompt("请输入字体颜色")
      setCookie('fontcolor',color,3)
    }
  </script>
</head>
<body>
  <input type="button" onclick="setBgColor('red')" value="设置背景色">
  <input type="button" onclick="setFontColor('yellow')" value="设置字体色">
  <a href="cookieBom_.html">跳转</a>
</body>
</html>